/**基础字典状态缓存 */
import { reactive, ref } from 'vue';
import { defineStore } from 'pinia';

export const BasicDicts = defineStore('BasicDicts', () => {
  let patTypeList = reactive([]) as any; /**病人类型基础字典 */

  /**actions */
  /**
   * 设置基础字典信息
   * @param arr
   */
  function setPatTypeList(arr: any) {
    if (arr && arr.length === 0) {
      patTypeList.length = 0;
    } else {
      Object.assign(patTypeList, arr);
    }
  }

  return { patTypeList, setPatTypeList };
});
